Crate fuzzy_select
source ·Expand description
A fuzzy select prompt for the terminal.
This crate is a library for creating a fuzzy select prompt for the terminal. It uses nucleo as its fuzzy matching engine. The prompt is very simple and not very configurable.
Usage
Add the following to your Cargo.toml
:
[dependencies]
fuzzy-select = "0.1"
Example
use fuzzy_select::FuzzySelect;
let options = vec!["foo", "bar", "baz"];
let selected = FuzzySelect::new()
.with_prompt("Select something")
.with_options(options)
.select()?;
println!("Selected: {:?}", selected);
Structs
- a bitset for all possible attributes
- The style that can be put on content.
- A fuzzy select prompt. See the module level documentation for more information.
- The style with the content to be styled.
- A theme describes how different parts of the prompt are rendered.
Enums
- Represents an attribute.
- Represents a color.
Traits
- An item that can be selected in a fuzzy select prompt.
- Provides a set of methods to set attributes and colors.